REQUESTSTRING TITLE '"Edit to-name"' BT '"_Ok|_Cancel"' ID '"'mlist.toconfnr.toname.i'"' MAXCHARS 40
if rc = 0 then do
mlist.toconfnr.toname.i = result
call writecfg(cfgfile)
end
end
end
end
end
end
end
signal editmlistmenu
delmlist:
if mlcount > 0 then do
do n = 1 to mlcount; conflist.n = mlist.n.name; end
conflist.count = mlcount
REQUESTLIST INSTEM conflist TITLE '"Select a mailling list"' SIZEGADGET
if rc ~= 0 then signal mlistmenu
delconf = result
REQUESTNOTIFY '"Do you want to remove this entry from\nSortMail''s configuration? (I will only\nstop sorting it, not delete the conference)"' "Yes|_No"
if result = 0 then signal mlistmenu
counter = 1
do n = 1 to mlcount
if mlist.n.name = delconf then n = n + 1
mlist.counter.name = mlist.n.name
if addrcount > 0 then do m = 1 to mlist.counter.addrcount
mlist.counter.toaddr.m = mlist.n.toaddr.m
end
if namecount > 0 then do m = 1 to mlist.counter.namecount
mlist.counter.toname.m = mlist.n.toname.m
end
mlist.counter.replyaddr = mlist.n.replyaddr
counter = counter + 1
if counter > mlcount then leave
end
mlcount = mlcount - 1
call writecfg(cfgfile)
end
else do
REQUESTNOTIFY '"There are no configured mailing lists."' '"_Abort"'
do n = 1 to dgcount; conflist.n = digest.n.name; end
conflist.count = dgcount
REQUESTLIST INSTEM conflist TITLE '"Select a digest"' SIZEGADGET
if rc ~= 0 then signal digestmenu
toconf = result
do n = 1 to dgcount; if toconf = digest.n.name then toconfnr = n; end
end
else do
REQUESTNOTIFY '"There are no configured digests."' '"_Abort"'
signal digestmenu
end
edit = 1
editdigestdata:
if digest.toconfnr.replyaddr = 'TEXT.REPLYADDR' then replyid = head.FROMADDR
else replyid = digest.toconfnr.replyaddr
REQUESTSTRING TITLE '"Enter a reply-address"' BT '"_Ok|_Cancel"' ID '"'replyid'"' MAXCHARS 40
if rc ~= 0 then do
if edit = 0 then dgcount = dgcount - 1
signal digestmenu
end
digest.toconfnr.replyaddr = result
do n = 1 to text.TEXT.COUNT
if upper(left(text.text.n, 6)) = 'FROM: ' then break
end
do n = n+1 to text.TEXT.COUNT
if upper(left(text.text.n, 6)) = 'FROM: ' then break
end
n = n + 5
m = 1
do o = n-30 to n
if left(text.text.o, 10) ~= 'TEXT.TEXT.' then do
endmsg.m = text.TEXT.o
m = m + 1
end
end
endmsg.count = n
if edit = 1 then do
REQUESTNOTIFY '"Do you want to edit the ''end of message''\nline? If yes, the 20 last lines from the\ncurrent message will be shown in a listview."' '"Yes|_No"'
editeom = result
end
else editeom = 1
if editeom = 1 then do
REQUESTLIST INSTEM endmsg TITLE '"Select ''end of message'' line"' SIZEGADGET
if rc ~= 0 then do
if edit ~= 1 then dgcount = dgcount - 1
signal digestmenu
end
digest.toconfnr.endsubmsg = result
end
REQUESTNOTIFY '"Do you want parsed digests to be deleted?\nWarning: Do NOT enable this until you are\ncertain the digests are parsed properly!"' '"Yes|_No|_Abort"'
digest.toconfnr.deldigest = result
if digest.toconfnr.deldigest = 0 then do
if edit ~= 1 then dgcount = dgcount - 1
signal digestmenu
end
if digest.toconfnr.deldigest = 2 then digest.toconfnr.deldigest = 0
address(bbsread)
CONFIGCONF '"'system'"' '"'toconf'"' SET c2x(CDF_NOT_ON_BBS)
if rc ~= 0 then do
address(thorport)
REQUESTNOTIFY '"'BBSREAD.LASTERROR'"' '"_Abort"'
end
call writecfg(cfgfile)
signal digestmenu
deldigest:
if dgcount > 0 then do
do n = 1 to dgcount; conflist.n = digest.n.name; end
conflist.count = dgcount
REQUESTLIST INSTEM conflist TITLE '"Select a digest"' SIZEGADGET
if rc ~= 0 then signal digestmenu
delconf = result
REQUESTNOTIFY '"Do you want to remove this entry from\nSortMail''s configuration? (I will only\nstop parsing, not delete the conference)"' "Yes|_No"
if result = 0 then signal digestmenu
counter = 1
do n = 1 to dgcount
if digest.n.name = delconf then n = n + 1
digest.counter.name = digest.n.name
if addrcount > 0 then do m = 1 to digest.counter.addrcount
digest.counter.toaddr.m = digest.n.toaddr.m
end
if namecount > 0 then do m = 1 to digest.counter.namecount
digest.counter.toname.m = digest.n.toname.m
end
digest.counter.replyaddr = digest.n.replyaddr
digest.counter.endsubmsg = digest.n.endsubmsg
digest.counter.enddigest = digest.n.enddigest
digest.counter.deldigest = digest.n.deldigest
counter = counter + 1
if counter > dgcount then leave
end
dgcount = dgcount - 1
call writecfg(cfgfile)
end
else do
REQUESTNOTIFY '"There are no configured digests."' '"_Abort"'